package com.demo.project_template.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author 杨玉龙
 * @since 2023-06-19 15:56:43
 */
@Data
@TableName("t_order_detail")
@ApiModel(value = "OrderDetail对象", description = "")
public class OrderDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("订单详情id")
      @TableId(value = "order_detail_id", type = IdType.AUTO)
    private Integer orderDetailId;

    @ApiModelProperty("订单表pk")
    @TableField("order_id")
    private Integer orderId;

    @ApiModelProperty("商品id")
    @TableField("product_id")
    private Integer productId;

    @ApiModelProperty("商品规格id")
    @TableField("product_spec_id")
    private Integer productSpecId;

    @ApiModelProperty("商品规格")
    @TableField("product_spec")
    private String productSpec;

    @ApiModelProperty("商品名")
    @TableField("product_name")
    private String productName;

    @ApiModelProperty("商品单价")
    @TableField("product_price")
    private BigDecimal productPrice;

    @ApiModelProperty("商品图片")
    @TableField("product_img")
    private String productImg;

    @ApiModelProperty("商品数量")
    @TableField("product_count")
    private Integer productCount;

    @ApiModelProperty("是否删除（0=否，1=是）")
    @TableField("is_delete")
    @TableLogic
    private String isDelete;

    @ApiModelProperty("创建时间")
      @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty("修改时间")
      @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


}
